<template>
    <div class="home">
        <div class="top-descrip">
            <div class="container">
                <div class="left-title">
                    <h1 class="title"><span>MtserverDoctor</span></h1>
                    <p class="text">使你愉快工作的<br/>一些小工具</p>
                    <p class="descrip">可以加密解密，甚至可以。。。<br/>欢迎使用，有问题欢迎讨论</p>
                </div>
                <div class="image">
                    <div class="bg-wrp"></div>
                    <img src="@/assets/logo.svg"/>
                </div>
            </div>
        </div>
        <div class="applications">
            <div class="container">
                <div class="items">
                    <div class="item" v-for="(item, idx) in applications" :key="idx" @click="click(item)">
                        <div class="application">
                            <div class="content">
                                <h2 class="title">
                                    <i :class="['icon', item.icon]"></i>{{ item.title }}
                                </h2>
                                <p>{{ item.descrip }}</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- <Footer></Footer> -->
    </div>
</template>
<script>
import Footer from '@/components/Footer.vue';

export default {
    components: { Footer },
    data() {
        return {
            applications: [
                {icon: 'el-icon-iconfonttubiao_zuanshi', title: '加密解密工具', descrip: '与组件类似的 Store。其 API 的设计旨在让你编写出更易组织的 store。', addr: '/ciphertool'},
                {icon: 'el-icon-iconfonttubiao_zuanshi', title: '加密解密工具', descrip: '与组件类似的 Store。其 API 的设计旨在让你编写出更易组织的 store。', addr: '/ciphertool'},
                {icon: 'el-icon-iconfonttubiao_zuanshi', title: '加密解密工具', descrip: '与组件类似的 Store。其 API 的设计旨在让你编写出更易组织的 store。', addr: '/ciphertool'},
                {icon: 'el-icon-iconfonttubiao_zuanshi', title: '加密解密工具', descrip: '与组件类似的 Store。其 API 的设计旨在让你编写出更易组织的 store。', addr: '/ciphertool'},
                {icon: 'el-icon-iconfonttubiao_zuanshi', title: '加密解密工具', descrip: '与组件类似的 Store。其 API 的设计旨在让你编写出更易组织的 store。', addr: '/ciphertool'},
                {icon: 'el-icon-iconfonttubiao_zuanshi', title: '加密解密工具', descrip: '与组件类似的 Store。其 API 的设计旨在让你编写出更易组织的 store。', addr: '/ciphertool'},
            ]
        }
    },
    methods: {
        click(item) {
            this.$router.push(item.addr);
        }
    }
}
</script>
<style scoped lang="scss">
.home {
    height: 100%;
}
.top-descrip {
    padding: 40px 0;
}
.container {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.left-title {
    width: 600px;
    &>p, &>h1 {
        margin: 0;
    }
    .title {
        background: var(--vp-home-name-background);
        line-height: 64px;
        font-size: 56px;
        font-weight: 700;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        max-width: 576px;
    }
    .text {
        line-height: 64px;
        font-size: 56px;
        max-width: 576px;
    }
    .descrip {
        line-height: 36px;
        font-size: 24px;
        padding-top: 12px;
        max-width: 576px;
        white-space: pre-wrap;
        overflow-wrap: break-word;
    }
}
.image {
    flex-grow: 1;
    height: 350px;
    position: relative;
    display: flex;
    justify-content: center;
    img {
        height: 100%;
    }
    .bg-wrp {
        width: 320px;
        height: 320px;
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        width: 260px;
        height: 80%;
        background-image: var(--vp-home-name-background);
        filter: blur(72px);
        transform: translate(-50%,-50%);
    }
}
.applications {
    min-height: calc(100% - 430px - 113px);
    padding-bottom: 20px;
    .items {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin: -8px;
    }
    .item {
        width: calc(100% / 3);
        padding: 8px;
        cursor: pointer;
    }
    .application {
        display: block;
        border: 1px solid var(--background-color-soft);
        border-radius: 12px;
        height: 100%;
        background-color: var(--background-color-soft);
        transition: border-color .25s,background-color .25s;
    }
    .content {
        display: flex;
        flex-direction: column;
        padding: 24px;
        height: 100%;
        &>p {
            flex-grow: 1;
            padding-top: 8px;
            line-height: 24px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-color-2);
        }
        .icon {
            color: var(--primary-color);
            margin-right: 8px;
        }
    }
    .title {
        line-height: 24px;
        font-size: 16px;
        font-weight: 600;
    }
}
</style>